starter.controller('boardsController', function($rootScope,$state,$ionicPopup,$timeout,$scope,Page, localStore,$location) {
		
		$scope.messages = [];
		$scope.hasmore = true;
		
		$scope.param = {
			_pageSize : 10,
			_pageIndex : 0,
		};
		
		$scope.queryMessage = function(){
			Page.ajaxGetQuiet('',$scope.param,function(resp){
				$(resp.data.rows).each(function(idx, message) {
	         		$scope.messages.push(message);
	            });
				if(resp.data.nextFlag == 'Y'){
					$scope.hasmore = true;
				}
			});
		};
	
		$scope.loadMore = function(){
			$scope.hasmore = false;
			$scope.param._pageIndex ++;
			$scope.queryMessage();
		};
		
		$scope.toBoardEdit = function(){
			$state.go('board_edit');
		};
		
		
		
		
		
});